-- garden
-- created by panyl
-- 地牢格子：花园/魔藤

return {
    restoreGrid = function(grid, info)
        -- 还原状态
        if type(info.garden_state) == "number" then
            grid.garden_state = info.garden_state;
        end
        if type(info.class_id) == "number" then
            grid.class_id = info.class_id;
        end
    end,

    collectContext = function(grid)
        -- 收集
        local ret = { ["garden_state"] = grid.garden_state, };
        if grid.class_id then
            ret.class_id = grid.class_id;
        end

        return ret;
    end,
};
